package com.hoshiicloud.shxping.feign.hystrix;

import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.market.entity.activities.Slideshow;
import com.hoshiicloud.market.entity.market.ShareInfo;
import com.hoshiicloud.shxping.feign.IMarketFeignService;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author yangcheng
 * @version 1.0
 * @title: HystrixMarketFeignFallback
 * @description: 营销微服务FeignClient熔断器
 * @date 2019/8/5 9:47
 * @mail maiboyc@163.com
 */
@Component
public class HystrixMarketFeignFallback implements IMarketFeignService {

    /**
     * 根据ID查找分享信息
     * @param id ID
     * @return Response<ShareInfo>
     */
    @Override
    public Response<ShareInfo> getShareInfoById(Long id) {
        return Response.failed("根据ID查找分享信息");
    }

    /**
     * 保存分享信息
     * @param entity 新增参数
     * @return Long
     */
    @Override
    public Response<Long> saveShareInfo(ShareInfo entity) {
        return Response.failed("保存分享信息失败");
    }

    /**
     * 查询分享信息
     * @param param 查询参数
     * @return Response<List<ShareInfo>>
     */
    @Override
    public Response<List<ShareInfo>> listShareInfo(ShareInfo param) {
        return Response.failed("查询分享信息失败");
    }

    /**
     * 查询banner图片
     * @param param 查询参数
     * @return Response<List<Banner>>
     */
    @Override
    public Response<List<Slideshow>> listBannerInfo(Slideshow param) {
        return Response.failed("查询banner信息失败");
    }
}
